package com.kclm;

import com.kclm.config.AppConfig;
import com.kclm.config.DataCollectionService;
import com.kclm.config.PersonConfig;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * @Author : lvhx
 * @Date: 2025/11/11 10:00
 * @Description:
 */
@SpringBootApplication
public class SpringBoot01MavenApplication {
    public static void main(String[] args) {
//        SpringApplication.run(SpringBoot01MavenApplication.class,args);
        ConfigurableApplicationContext context =
                SpringApplication.run(SpringBoot01MavenApplication.class,args);
//        AppConfig appConfig = context.getBean(AppConfig.class);
//        appConfig.getInfo();
//        PersonConfig personConfig = context.getBean(PersonConfig.class);
//        System.out.println(personConfig.getHobby()+ personConfig.getName());
        DataCollectionService dataCollectionService = context.getBean(DataCollectionService.class);
        dataCollectionService.collection();
    }
}